From 670741eb9496339f88e0133ce8d96a85040faec1 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 12 Mar 2009 11:24:25 +0000 Subject: [PATCH] Fix Makefile portability: head -n -1 isn't portable. Signed-off-by: John Levon --- xen/arch/x86/boot/build32.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/boot/build32.mk b/xen/arch/x86/boot/build32.mk index 3223bcf4f9..a570d42524 100644 --- a/xen/arch/x86/boot/build32.mk +++ b/xen/arch/x86/boot/build32.mk @@ -10,8 +10,9 @@ $(call cc-option-add,CFLAGS,CC,-fno-stack-protector-all) CFLAGS += -Werror -fno-builtin -msoft-float +# NB. awk invocation is a portable alternative to 'head -n -1' %.S: %.bin - (od -v -t x $< | head -n -1 | \ + (od -v -t x $< | awk 'NR > 1 {print s} {s=$$0}' | \ sed 's/ /,0x/g' | sed 's/^[0-9]*,/ .long /') >$@ %.bin: %.lnk -- 2.30.2